\documentclass{article}

\oddsidemargin 0.0in
\evensidemargin 0.0in

\usepackage{booktabs}

\begin{document}

\section{Variable Names}
\begin{center}
\begin{tabular}[htp]{ccp{6cm}}
File Name & Variable Name & Purpose\\
\toprule
lexer.l & line & Current Row in the Input Logic Specification being parsed\\
\midrule
lexer.l & col & Current Column in the Input Logic Specification being parsed\\
\midrule
lexer.l & hashcount (external) & Index of the Last Valid Entry in the global Symbol Table (starts at -1 $\Rightarrow$ No entries are valid.)\\
\midrule
lexer.l & hashtable (external) & A two-dimensional arrary of characters (Size is MAXHASHSIZE $\times$ MAXHASHENTRYLEN)\\
\midrule
automata.h & MAXHASHSIZE (definition) & Maximum number of entries in symbol table (Set to 1000)\\
\midrule
automata.h & MAXHASHENTRYLEN (definition) & Maximum length of an entry in Symbol Table (Set to 128)\\
\midrule
automata.h & node & pointer to structure with int nodeid (Unique ID of each node), int nodevar (Symbol Table ID of a variable or TRUE/FALSE), int accept(CTRUE(accepting), CFALSE(rejecting), CFINAL(final)), three children nodes (node* succ1, succ2, succ3), int nodetype (AF, AG, AU and other types)\\
\midrule
parser.c & MAXCOL (definition) & Maximum number of variables in a trace (Set to 50)\\
\midrule
parser.c & MAXROW (definition) & Maximum length of a trace (Set to 10000)\\
\midrule
parser.c & line (external) & Current Row in the Input Logic Specification being parsed\\
\midrule
\bottomrule
\end{tabular}
\end{center}


\begin{center}
\begin{tabular}[htp]{ccp{6cm}}
\toprule
parser.c & col (external) & Current Column in the Input Logic Specification being parsed\\
\midrule
parser.c & hashcount & Index of the Last Valid Entry in the global Symbol Table (starts at -1 $\Rightarrow$ No entries are valid.)\\
\midrule
parser.c & hashtable & A two-dimensional arrary of characters (Size is MAXHASHSIZE $\times$ MAXHASHENTRYLEN)\\
\midrule
parser.c & name &  A two-dimensional arrary of characters (Size is MAXHASHSIZE $\times$ MAXHASHENTRYLEN). Stores the header of the data file. name[0] is time. name[1] through name[n] is the list of variables. \\
\midrule
parser.c & globalid & The counter that is used to assign IDs to new nodes in the automata (Set to 0)\\
\midrule
parser.c & t & -- (Set to 0)\\
\midrule
parser.c & oldtime & -- (Set to -1)\\
\midrule
automata.h & node (external) & pointer to strcuture with int nodeid (Unique ID of each node), int nodevar (Symbol Table ID of a variable or TRUE/FALSE), int accept(CTRUE(accepting), CFALSE(rejecting), CFINAL(final)), three children nodes (node* succ1, succ2, succ3), int nodetype (AF, AG, AU and other types)\\
\midrule
parser.c & newtime & -- (Set to -1)\\
\midrule
parser.c & arithopdata & Float result of arithmetic computation (uninitialized)\\
\midrule
parser.c & automata & Type node\\
\midrule
parser.c & fp (main) & Pointer to argv[1] as readable data file\\
\midrule
parser.c & data (main) & MAXCOL $\times$ MAXROW in size; data[i][j] indicates variable i at time j; data[0][0] is valid\\
\bottomrule
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}[htp]{ccp{6cm}}
parser.c & sample (main) &  \\
\midrule
parser.c & output & Boolean (as Integer) value returned from Simulate function and then returned from the LTL verifier \\
\midrule
parser.c & n (main) & Number of the variables in array data  \\
\midrule
parser.c & m (main) & Length of the trace in array data  \\
\midrule
parser.c & - & --  \\
\midrule

\bottomrule
\end{tabular}
\end{center}

\newpage 

\section{Function Declarations}
\begin{center}
\begin{tabular}[htp]{ccp{8cm}}
File Name & Function Name & Purpose\\
\toprule
lexer.l & addtohash & Input: Array of characters; Output: Integer position of the string in the SymbolTable; (Also adds the string to the end of the hashtable - only if it is not already there and increments hashcount.)\\
\midrule
lexer.l & reset\_lexer & Input: void Output: void (Resets line and col to 1)\\
\midrule
lexer.l & yyerror & Input: Error string from parser; Output: Void (Prints line and column number alongwith the error from the parser.)\\
\midrule 
parser.c & addtohash (external) & Input: Array of characters; Output: Integer position of the string in the SymbolTable; (Also adds the string to the end of the hashtable - only if it is not already there and increments hashcount.)\\
\midrule
parser.c & newnodeid & Input: Void; Output: Integer representing the next available unique ID for an automata node (Starts at 0) [Increments globalid] \\
\midrule
parser.c & generate\_node & Input: int TrueorFalse, node ParentNodeToWhichToJump, int AcceptorReject; Output: ASPECIAL node with succ1 pointing to the parent node passed to the function and the right node as empty\\
\midrule
parser.c & find & Input: index into the SymbolTable parsed from the LTL formula for the, int total number of variables in the input (start with \# and then time and the variables in the input); Output:  int (j-1) where j is index  into the name tables (from the data file) such that it matches the variable at the input index into the SymbolTable from the LTL formula\\
\midrule
parser.c & getdata & Input: automata node to get data from, data[][] array with all the simulation data, n: total number of variables in data[][], m: unknown, t: time of the simulation [Works with ID, ADD, SUB, MUl, DIV]\\
\midrule
parser.c & simulate & Input: automata node, data[][] array with all the simulation data, n: total number of variables in data[][], m: unknown, t: time of the simulation\\
\midrule
\bottomrule
\end{tabular}
\end{center}


\newpage 

\section{Symbol Definitions for Lexer and parser}
\begin{center}
\begin{tabular}[htp]{cccp{4cm}}
File Name & Symbol & Token Returned & Purpose\\
\toprule
lexer.l & F & FUTURE\\
\midrule
lexer.l & G & GLOBAL\\
\midrule
lexer.l & X & NEXT\\
\midrule
lexer.l & U & UNTIL\\
\midrule
lexer.l & AND & AND\\
\midrule
lexer.l & OR & OR\\
\midrule
lexer.l & NOT & NOT\\
\midrule
lexer.l & ( & LBR\\
\midrule
lexer.l & ) & RBR\\
\midrule
lexer.l & \{ & LCBR\\
\midrule
lexer.l & \} & RCBR\\
\midrule
lexer.l & [ & LSQBR\\
\midrule
lexer.l & ] & RSQBR\\
\midrule
lexer.l & * & MUL\\
\midrule
lexer.l & / & DIV\\
\midrule
lexer.l & + & ADD\\
\midrule
lexer.l & - & SUB\\
\midrule
lexer.l & $<$ & COMPARATOR\\
\midrule
lexer.l & $>$ & COMPARATOR\\
\midrule
lexer.l & $<=$ & COMPARATOR\\
\midrule
lexer.l & $>=$ & COMPARATOR\\
\midrule
lexer.l & $=$ & COMPARATOR\\
\midrule
lexer.l & [A-Za-z][A-Za-z0-9\_]* & IDENTIFIER\\
\midrule
lexer.l & [0-9][0-9]* & INTEGER\\
\midrule
lexer.l & [0-9][0-9]*.[0-9][0-9]* & INTEGER\\
\midrule
\bottomrule
\end{tabular}
\end{center}


\newpage 

\section{Structure  of  Automata}

\begin{center}
\begin{tabular}[htp]{cccccp{1.4cm}c}
File  & Node & Type & Successor-1 & Successor-2 & NodeVar & Accept\\
\toprule
parser.y & AND  & AAND  & left automata & right automata & -1 & -1\\
\midrule
parser.y & OR  & AOR  & left automata & right automata & -1 & -1 \\
\midrule
parser.y & NOT  & ANOT  & (the only) automata & NULL & -1 & -1 \\
\midrule
parser.y & ()  & ABR  & (the only) automata & NULL & -1 & -1 \\
\midrule
parser.y & Next  & AX  & NULL & (the only) automata & CTRUE & CFALSE \\
\midrule
parser.y & Global  & AG  & (CTRUE,self,CTRUE) & (the only) automata & -1 & -1 \\
parser.y & G-Node & ASPECIAL & AG-Parent & NULL & CTRUE & CTRUE \\
\midrule
parser.y & Future  & AF  & (CTRUE,self,CFALSE) & (the only) automata & -1 & -1 \\
parser.y & F-Node & ASPECIAL & AF-Parent & NULL & CTRUE & CFALSE \\
\midrule
parser.y & Compare Rule & ACOMP  & left automata & right integer & -1 & CFINAL \\
 & Compare Rule  & ACOMP  & NOTE: successor 3  &   is comparator &   &   \\
 \midrule
parser.y & Identifier  & AID  & NULL & NULL & Symbol Table Index & CFINAL \\
\midrule
parser.y & ADD  & AADD  & left automata & right automata & ADD & CFINAL \\
\midrule
parser.y & SUB  & ASUB  & left automata & right automata & SUB & CFINAL \\
\midrule
parser.y & MUL  & AMUL  & left automata & right automata & MUL & CFINAL \\
\midrule
parser.y & DIV  & ADIV  & left automata & right automata & DIV & CFINAL \\
\midrule
parser.y & COMP... & ACO..  & left automata & right automata & COM... & CFINAL \\
\midrule
parser.y & Until & AU  & right automata & AUCHILD & -- & -- \\
parser.y & U-node & ASPECIAL  & AU-Parent  & left automata & CTRUE & CFALSE \\
\midrule
\bottomrule
\end{tabular}
\end{center}

\end{document}
